<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('【请填写功能名称】列表')" />
</head>
<body class="gray-bg">
<div class="container-div">


    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <label>监测点名称：</label>
                            <select name="moniterId" id="moniterId" >
                            </select>
                        </li>
                        <li>
                            <input type="text" name="v1"/>-<input type="text" name="v2"/>
                        </li>
                        <li>
                            <input type="text" name="yls"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()" ><i class="fa fa-search"></i>&nbsp;搜索</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>


        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript" type="text/javascript">

    var editFlag = [[${@permission.hasPermi('bus:minute:edit')}]];
    var removeFlag = [[${@permission.hasPermi('bus:minute:remove')}]];
    var prefix = ctx + "bus/minute";
    $(document).ready(function(){
        loadDepartmentName();
    });
    function loadDepartmentName() {
        $.ajax({
            url: prefix+"/list",
            type: "post",
            success: function (data) {
                var nameOpt = "<option value='' selected='selected'>--请选择--</option>";
                for (var i = 0; i < data.rows.length; i++) {
                    nameOpt+="<option value='"+data.rows[i].moniterId+"' >"+data.rows[i].busMonitor.monitorName+"</option>"
                    $('#moniterId').html(nameOpt);
                }
            }
        });
    };
    $(function() {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "【请填写功能名称】",
            columns: [

                {
                    field: 'id',
                    title: 'id',
                    visible: false
                },
                {
                    field: 'busMonitor.monitorName',
                    title: '监测点'
                },
                {
                    field: 'produceTime',
                    title: '产生时间'
                },
                {
                    field: 'ad',
                    title: '氨氮(mg/L)'
                },
                {
                    field: 'zl',
                    title: '总磷(mg/L)'
                },
                {
                    field: 'zd',
                    title: '浊度(NTU)'
                },
                {
                    field: 'wd',
                    title: '温度'
                },
                {
                    field: 'yls',
                    title: '叶绿素(SPAD)'
                },

                ]
        };
        $.table.init(options);
    });
</script>
</body>
</html>